<template>
  <div class="home">
    <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
      <van-swipe-item>1</van-swipe-item>
      <van-swipe-item>2</van-swipe-item>
      <van-swipe-item>3</van-swipe-item>
      <van-swipe-item>4</van-swipe-item>
    </van-swipe>
    <div class="con">
        <span v-for="item in list" :key="item.id">
            <img :src="item.img" alt="">
            {{item.name}}
        </span>
    </div>
  </div>
</template>

<script>

export default {
    data(){
        return {
            list:[
        {
            img:'https://img01.yzcdn.cn/vant/cat.jpeg',
            name:'成单奖励',
            id:'1'
        },
        {
            img:'https://img01.yzcdn.cn/vant/cat.jpeg',
            name:'成单奖励',
            id:'2'
        },
        {
            img:'https://img01.yzcdn.cn/vant/cat.jpeg',
            name:'成单奖励',
            id:'3'
        },
        {
            img:'https://img01.yzcdn.cn/vant/cat.jpeg',
            name:'成单奖励',
            id:'4'
        },
        {
            img:'https://img01.yzcdn.cn/vant/cat.jpeg',
            name:'成单奖励',
            id:'5'
        },
        {
            img:'https://img01.yzcdn.cn/vant/cat.jpeg',
            name:'成单奖励',
            id:'6'
        },
        {
            img:'https://img01.yzcdn.cn/vant/cat.jpeg',
            name:'成单奖励',
            id:'7'
        },
        {
            img:'https://img01.yzcdn.cn/vant/cat.jpeg',
            name:'成单奖励',
            id:'8'
        },
        {
            img:'https://img01.yzcdn.cn/vant/cat.jpeg',
            name:'成单奖励',
            id:'9'
        },
        {
            img:'https://img01.yzcdn.cn/vant/cat.jpeg',
            name:'成单奖励',
            id:'10'
        }
    ]
        }
    }
};
</script>

<style lang="scss">
.my-swipe .van-swipe-item {
  color: #fff;
  font-size: 20px;
  line-height: 150px;
  text-align: center;
  background-color: #39a9ed;
}
.con{
    width: 100%;
    height: auto;
    box-sizing: border-box;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    span{
        width: calc(95%/5);
        text-align: center;
        margin: 5px 1px;
        img{
            width: 60px;
            height: 60px;
            margin: 0 auto;
            border-radius: 50%;
        }
    }
}
</style>